<html>
<head><meta charset="utf-8"><title>taits deconstruction ICE · wg-traits · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/index.html">wg-traits</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html">taits deconstruction ICE</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="242943572"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/242943572" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#242943572">(Jun 16 2021 at 21:08)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> about the bug you pointed out <a href="https://github.com/rust-lang/rust/blob/246571a846e29691bd535d531365acd318857207/compiler/rustc_mir/src/borrow_check/type_check/mod.rs#L1293-L1296">here</a></p>



<a name="242943620"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/242943620" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#242943620">(Jun 16 2021 at 21:09)</a>:</h4>
<p>I was trying to come up with a test case</p>



<a name="242943638"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/242943638" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#242943638">(Jun 16 2021 at 21:09)</a>:</h4>
<p>was trying things out and used ...</p>



<a name="242943643"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/242943643" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#242943643">(Jun 16 2021 at 21:09)</a>:</h4>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="cp">#![feature(impl_trait_in_bindings)]</span><span class="w"></span>

<span class="k">fn</span> <span class="nf">f</span><span class="o">&lt;</span><span class="n">A</span><span class="p">,</span><span class="w"> </span><span class="n">B</span><span class="o">&gt;</span><span class="p">(</span><span class="n">a</span>: <span class="nc">A</span><span class="p">,</span><span class="w"> </span><span class="n">b</span>: <span class="nc">B</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="kd">let</span><span class="w"> </span><span class="n">x</span>: <span class="p">(</span><span class="k">impl</span><span class="w"> </span><span class="nb">Into</span><span class="o">&lt;</span><span class="n">A</span><span class="o">&gt;</span><span class="p">,</span><span class="w"> </span><span class="k">impl</span><span class="w"> </span><span class="nb">Into</span><span class="o">&lt;</span><span class="n">B</span><span class="o">&gt;</span><span class="p">)</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">(</span><span class="n">a</span><span class="p">,</span><span class="w"> </span><span class="n">b</span><span class="p">);</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="k">fn</span> <span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{}</span><span class="w"></span>
</code></pre></div>



<a name="242943663"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/242943663" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#242943663">(Jun 16 2021 at 21:09)</a>:</h4>
<p>got</p>



<a name="242943664"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/242943664" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#242943664">(Jun 16 2021 at 21:09)</a>:</h4>
<div class="codehilite"><pre><span></span><code>error: internal compiler error: broken MIR in DefId(0:3 ~ test[317d]::f) (_3 = (move _4, move _5)): bad assignment ((impl std::convert::Into&lt;A&gt;, impl std::convert::Into&lt;B&gt;) = (A, B)): NoSolution
 --&gt; test.rs:4:43
  |
4 |     let x: (impl Into&lt;A&gt;, impl Into&lt;B&gt;) = (a, b);
  |                                           ^^^^^^
  |
  = note: delayed at compiler/rustc_mir/src/borrow_check/type_check/mod.rs:253:27

thread &#39;rustc&#39; panicked at &#39;no errors encountered even though `delay_span_bug` issued&#39;, compiler/rustc_errors/src/lib.rs:1023:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&amp;template=ice.md

note: rustc 1.55.0-dev running on x86_64-unknown-linux-gnu

query stack during panic:
end of query stack
</code></pre></div>



<a name="242945900"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/242945900" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#242945900">(Jun 16 2021 at 21:29)</a>:</h4>
<p>interesting ...</p>



<a name="242945950"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/242945950" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#242945950">(Jun 16 2021 at 21:30)</a>:</h4>
<p>in this particular example I'm looking at what I have is:</p>



<a name="242945989"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/242945989" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#242945989">(Jun 16 2021 at 21:30)</a>:</h4>
<p>here <a href="https://github.com/rust-lang/rust/blob/246571a846e29691bd535d531365acd318857207/compiler/rustc_mir/src/borrow_check/type_check/mod.rs#L1136">https://github.com/rust-lang/rust/blob/246571a846e29691bd535d531365acd318857207/compiler/rustc_mir/src/borrow_check/type_check/mod.rs#L1136</a></p>



<a name="242946020"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/242946020" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#242946020">(Jun 16 2021 at 21:30)</a>:</h4>
<p><code>sub=(A, B) sup=(impl std::convert::Into&lt;A&gt;, impl std::convert::Into&lt;B&gt;)</code></p>



<a name="242946027"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/242946027" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#242946027">(Jun 16 2021 at 21:31)</a>:</h4>
<p>so</p>



<a name="242946050"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/242946050" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#242946050">(Jun 16 2021 at 21:31)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/blob/246571a846e29691bd535d531365acd318857207/compiler/rustc_mir/src/borrow_check/type_check/mod.rs#L1144">https://github.com/rust-lang/rust/blob/246571a846e29691bd535d531365acd318857207/compiler/rustc_mir/src/borrow_check/type_check/mod.rs#L1144</a></p>



<a name="242946059"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/242946059" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#242946059">(Jun 16 2021 at 21:31)</a>:</h4>
<p><code>sup</code> is not Opaque</p>



<a name="242946068"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/242946068" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#242946068">(Jun 16 2021 at 21:31)</a>:</h4>
<p>returns err <a href="https://github.com/rust-lang/rust/blob/246571a846e29691bd535d531365acd318857207/compiler/rustc_mir/src/borrow_check/type_check/mod.rs#L1152">https://github.com/rust-lang/rust/blob/246571a846e29691bd535d531365acd318857207/compiler/rustc_mir/src/borrow_check/type_check/mod.rs#L1152</a></p>



<a name="242946157"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/242946157" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#242946157">(Jun 16 2021 at 21:32)</a>:</h4>
<p>and explodes here <a href="https://github.com/rust-lang/rust/blob/246571a846e29691bd535d531365acd318857207/compiler/rustc_mir/src/borrow_check/type_check/mod.rs#L1466-L1473">https://github.com/rust-lang/rust/blob/246571a846e29691bd535d531365acd318857207/compiler/rustc_mir/src/borrow_check/type_check/mod.rs#L1466-L1473</a></p>



<a name="242946905"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/242946905" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#242946905">(Jun 16 2021 at 21:41)</a>:</h4>
<p>well, I guess <a href="https://github.com/rust-lang/rust/blob/246571a846e29691bd535d531365acd318857207/compiler/rustc_mir/src/borrow_check/type_check/mod.rs#L1143">https://github.com/rust-lang/rust/blob/246571a846e29691bd535d531365acd318857207/compiler/rustc_mir/src/borrow_check/type_check/mod.rs#L1143</a> shouldn't return Err in the first place</p>



<a name="242949865"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/242949865" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#242949865">(Jun 16 2021 at 22:11)</a>:</h4>
<p>I'm not sure if now this <a href="https://github.com/rust-lang/rust/blob/246571a846e29691bd535d531365acd318857207/compiler/rustc_middle/src/ty/relate.rs#L338">https://github.com/rust-lang/rust/blob/246571a846e29691bd535d531365acd318857207/compiler/rustc_middle/src/ty/relate.rs#L338</a> needs to handle <code>(Param, Opaque)</code></p>



<a name="242992235"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/242992235" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#242992235">(Jun 17 2021 at 09:23)</a>:</h4>
<p>So, the <code>impl Trait</code> in let bindings code is very wrong</p>



<a name="242992279"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/242992279" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#242992279">(Jun 17 2021 at 09:24)</a>:</h4>
<p>I sort of think we should remove support and re-implement it later</p>



<a name="242992340"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/242992340" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#242992340">(Jun 17 2021 at 09:25)</a>:</h4>
<p>But I'm trying to think how to reveal that bug, I'm a touch surprised your existing test cases didn't already do it, I suspect the problem is that the error winds up getting detected earlier</p>



<a name="242992354"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/242992354" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#242992354">(Jun 17 2021 at 09:25)</a>:</h4>
<p>/me thinks</p>



<a name="243018592"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243018592" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243018592">(Jun 17 2021 at 13:40)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE/near/242992340">said</a>:</p>
<blockquote>
<p>But I'm trying to think how to reveal that bug, I'm a touch surprised your existing test cases didn't already do it, I suspect the problem is that the error winds up getting detected earlier</p>
</blockquote>
<p>probably?</p>



<a name="243018653"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243018653" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243018653">(Jun 17 2021 at 13:41)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE/near/242992279">said</a>:</p>
<blockquote>
<p>I sort of think we should remove support and re-implement it later</p>
</blockquote>
<p>if you want we can talk about this</p>



<a name="243022241"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243022241" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243022241">(Jun 17 2021 at 14:05)</a>:</h4>
<p>yes, maybe we should do that</p>



<a name="243022288"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243022288" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243022288">(Jun 17 2021 at 14:05)</a>:</h4>
<p>I was thinking <span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> -- maybe you can modify <code>get_by</code></p>



<a name="243022300"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243022300" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243022300">(Jun 17 2021 at 14:05)</a>:</h4>
<p>right now it returns the first match</p>



<a name="243022313"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243022313" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243022313">(Jun 17 2021 at 14:05)</a>:</h4>
<p>what if it asserted that there is <em>exactly one</em> match</p>



<a name="243022334"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243022334" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243022334">(Jun 17 2021 at 14:05)</a>:</h4>
<p>I'd be curious to see where those assertions fail, I think any such failure is a bug</p>



<a name="243022406"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243022406" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243022406">(Jun 17 2021 at 14:06)</a>:</h4>
<p>if we did that, I'd feel comfortable shipping the code as-is, since we'll get ICEs if the assumption is wrong</p>



<a name="243022439"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243022439" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243022439">(Jun 17 2021 at 14:06)</a>:</h4>
<p><span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span></p>



<a name="243022566"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243022566" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243022566">(Jun 17 2021 at 14:07)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> but you literally meant to modify the <code>VecMap::get_by</code>?</p>



<a name="243022600"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243022600" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243022600">(Jun 17 2021 at 14:07)</a>:</h4>
<p>unsure how weird it is for that specific method to have an assert about that inside :)</p>



<a name="243022638"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243022638" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243022638">(Jun 17 2021 at 14:07)</a>:</h4>
<p>I would be ok with it</p>



<a name="243022656"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243022656" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243022656">(Jun 17 2021 at 14:07)</a>:</h4>
<p>ok :)</p>



<a name="243022657"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243022657" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243022657">(Jun 17 2021 at 14:07)</a>:</h4>
<p>"get" sort of implies that it's doing a hashmap lookup</p>



<a name="243022661"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243022661" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243022661">(Jun 17 2021 at 14:07)</a>:</h4>
<p>and that there is a single entry</p>



<a name="243022672"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243022672" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243022672">(Jun 17 2021 at 14:08)</a>:</h4>
<p>we could modify the name</p>



<a name="243022673"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243022673" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243022673">(Jun 17 2021 at 14:08)</a>:</h4>
<p>yep</p>



<a name="243022717"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243022717" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243022717">(Jun 17 2021 at 14:08)</a>:</h4>
<p>"get_only_key_matching"</p>



<a name="243022756"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243022756" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243022756">(Jun 17 2021 at 14:08)</a>:</h4>
<p>or <code>get_value_matching(...)</code> or something</p>



<a name="243022771"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243022771" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243022771">(Jun 17 2021 at 14:08)</a>:</h4>
<p>the singular suggests there is just one</p>



<a name="243024266"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243024266" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243024266">(Jun 17 2021 at 14:19)</a>:</h4>
<p>the assert message can say ... if you see this ICE, it's @spastorino's fault, ping him on github <span aria-label="joy" class="emoji emoji-1f602" role="img" title="joy">:joy:</span></p>



<a name="243028293"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243028293" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243028293">(Jun 17 2021 at 14:44)</a>:</h4>
<p>heh</p>



<a name="243028312"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243028312" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243028312">(Jun 17 2021 at 14:44)</a>:</h4>
<p>I'm curious first to see if all of our tests pass :)</p>



<a name="243029267"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243029267" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243029267">(Jun 17 2021 at 14:50)</a>:</h4>
<p>yeah, will try this out a bit later</p>



<a name="243064804"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243064804" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243064804">(Jun 17 2021 at 18:44)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/issues/86410">#86410</a></p>



<a name="243068323"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243068323" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243068323">(Jun 17 2021 at 19:09)</a>:</h4>
<p>ok, unsure why I got no failures locally but ui tests are failing</p>



<a name="243068327"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243068327" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243068327">(Jun 17 2021 at 19:09)</a>:</h4>
<p>anyway, this is good :)</p>



<a name="243069946"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243069946" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243069946">(Jun 17 2021 at 19:20)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> do we want to apply the <code>assert</code> also in this case ... <a href="https://github.com/spastorino/rust/blob/95a327b4e5ebcf81dcc3a178d4bddad165bb596b/compiler/rustc_typeck/src/collect/type_of.rs#L522">https://github.com/spastorino/rust/blob/95a327b4e5ebcf81dcc3a178d4bddad165bb596b/compiler/rustc_typeck/src/collect/type_of.rs#L522</a> ?</p>



<a name="243070214"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243070214" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243070214">(Jun 17 2021 at 19:22)</a>:</h4>
<p>I think I'm a bit confused now,  just in case, let me re ask a couple of question to confirm things ...</p>



<a name="243070222"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243070222" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243070222">(Jun 17 2021 at 19:22)</a>:</h4>
<p>why should always be one element with that <code>def_id</code>? and why do we want to not match using <code>substs</code> there?</p>



<a name="243070315"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243070315" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243070315">(Jun 17 2021 at 19:22)</a>:</h4>
<p>I want the ICE all the time</p>



<a name="243070329"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243070329" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243070329">(Jun 17 2021 at 19:22)</a>:</h4>
<p>If it's firing, it means we're doing something wrong</p>



<a name="243070344"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243070344" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243070344">(Jun 17 2021 at 19:23)</a>:</h4>
<p>oh well, wait</p>



<a name="243070353"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243070353" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243070353">(Jun 17 2021 at 19:23)</a>:</h4>
<p>this is looking for <em>does no value match</em></p>



<a name="243070389"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243070389" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243070389">(Jun 17 2021 at 19:23)</a>:</h4>
<p>ok <span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> we don't want the ICE for that case</p>



<a name="243070408"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243070408" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243070408">(Jun 17 2021 at 19:23)</a>:</h4>
<p>we probably just want a function like <code>any_value_matching</code> or maybe just <code>iter().any(...)</code></p>



<a name="243070427"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243070427" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243070427">(Jun 17 2021 at 19:23)</a>:</h4>
<p>er, <code>.keys().any(...)</code></p>



<a name="243070776"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243070776" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243070776">(Jun 17 2021 at 19:26)</a>:</h4>
<p>right, that seemed to me also</p>



<a name="243077123"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243077123" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243077123">(Jun 17 2021 at 20:10)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> after these changes is exactly ICEing in the code you said was wrong :)</p>



<a name="243077270"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243077270" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243077270">(Jun 17 2021 at 20:11)</a>:</h4>
<p>I guess tests are not failing because the first element (the one that was being returned) is exactly the one that also matches on <code>(def_id, substs)</code></p>



<a name="243077276"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243077276" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243077276">(Jun 17 2021 at 20:11)</a>:</h4>
<p>I guess</p>



<a name="243077347"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243077347" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243077347">(Jun 17 2021 at 20:11)</a>:</h4>
<p>but I also guess it should be easy to start from those examples and build one where this fails, so we have a regression test just in case</p>



<a name="243084898"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243084898" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243084898">(Jun 17 2021 at 21:06)</a>:</h4>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">type</span> <span class="nc">X</span><span class="o">&lt;</span><span class="n">A</span><span class="p">,</span><span class="w"> </span><span class="n">B</span><span class="o">&gt;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">impl</span><span class="w"> </span><span class="nb">Into</span><span class="o">&lt;</span><span class="n">A</span><span class="o">&gt;</span><span class="p">;</span><span class="w"></span>

<span class="k">fn</span> <span class="nf">f</span><span class="o">&lt;</span><span class="n">T</span><span class="p">,</span><span class="w"> </span><span class="n">Z</span><span class="o">&gt;</span><span class="p">(</span><span class="n">a</span>: <span class="nc">T</span><span class="p">,</span><span class="w"> </span><span class="n">b</span>: <span class="nc">Z</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="p">(</span><span class="n">X</span><span class="o">&lt;</span><span class="n">T</span><span class="p">,</span><span class="w"> </span><span class="n">Z</span><span class="o">&gt;</span><span class="p">,</span><span class="w"> </span><span class="n">X</span><span class="o">&lt;</span><span class="n">Z</span><span class="p">,</span><span class="w"> </span><span class="n">T</span><span class="o">&gt;</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="p">(</span><span class="n">b</span><span class="p">,</span><span class="w"> </span><span class="n">a</span><span class="p">)</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="243084945"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243084945" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243084945">(Jun 17 2021 at 21:07)</a>:</h4>
<div class="codehilite"><pre><span></span><code>DEBUG rustc_mir::borrow_check::type_check CHECK: concrete_opaque_types = VecMap([(OpaqueTypeKey { def_id: DefId(0:6 ~ multiple_def_uses_in_one_fn[317d]::X::{opaque#0}), substs: [T, Z] }, B), (OpaqueTypeKey { def_id: DefId(0:6 ~ multip    le_def_uses_in_one_fn[317d]::X::{opaque#0}), substs: [Z, T] }, B)])
DEBUG rustc_mir::borrow_check::type_check CHECK: opaque_type_key = OpaqueTypeKey { def_id: DefId(0:6 ~ multiple_def_uses_in_one_fn[317d]::X::{opaque#0}), substs: [T, Z] }
DEBUG rustc_mir::borrow_check::type_check CHECK: concrete_ty = B
DEBUG rustc_mir::borrow_check::renumber renumber_regions(value=Z)
DEBUG rustc_mir::borrow_check::type_check eq_opaque_type_and_type: concrete_ty=B=_ opaque_defn_ty=Z
DEBUG rustc_mir::borrow_check::type_check CHECK: concrete_opaque_types = VecMap([(OpaqueTypeKey { def_id: DefId(0:6 ~ multiple_def_uses_in_one_fn[317d]::X::{opaque#0}), substs: [T, Z] }, B), (OpaqueTypeKey { def_id: DefId(0:6 ~ multip    le_def_uses_in_one_fn[317d]::X::{opaque#0}), substs: [Z, T] }, B)])
DEBUG rustc_mir::borrow_check::type_check CHECK: opaque_type_key = OpaqueTypeKey { def_id: DefId(0:6 ~ multiple_def_uses_in_one_fn[317d]::X::{opaque#0}), substs: [Z, T] }
DEBUG rustc_mir::borrow_check::type_check CHECK: concrete_ty = B
</code></pre></div>



<a name="243085120"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243085120" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243085120">(Jun 17 2021 at 21:08)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> I was wondering, why <code>concrete_opaque_types</code> has as value always <code>B</code> here?</p>



<a name="243085183"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243085183" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243085183">(Jun 17 2021 at 21:09)</a>:</h4>
<p>there's two entries, for def_id <code>6</code>, one with substs <code>[T, Z]</code> and the other with <code>[Z, T]</code> but both with <code>B</code> value</p>



<a name="243085732"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243085732" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243085732">(Jun 17 2021 at 21:14)</a>:</h4>
<p>and if I return <code>(a, b)</code> the value is always <code>A</code></p>



<a name="243085928"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243085928" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243085928">(Jun 17 2021 at 21:15)</a>:</h4>
<p>I meant, I'd get that that makes sense for the first defining use of <code>X</code>, but what about the other one?</p>



<a name="243086103"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243086103" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243086103">(Jun 17 2021 at 21:16)</a>:</h4>
<p>ohh well, the other use is not a defining one? I guess, the other occurrence just check if it's compatible and never exercise this code again?</p>



<a name="243090837"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243090837" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243090837">(Jun 17 2021 at 22:01)</a>:</h4>
<p>yes, I figured it would ICE</p>



<a name="243091436"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243091436" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243091436">(Jun 17 2021 at 22:08)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> unsure I got what you meant</p>



<a name="243091484"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243091484" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243091484">(Jun 17 2021 at 22:08)</a>:</h4>
<p>sorry</p>



<a name="243091488"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243091488" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243091488">(Jun 17 2021 at 22:08)</a>:</h4>
<p>I didnt' finish :)</p>



<a name="243091495"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243091495" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243091495">(Jun 17 2021 at 22:08)</a>:</h4>
<p>I meant "good that it is ICEing, that confirms my suspicions"</p>



<a name="243091498"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243091498" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243091498">(Jun 17 2021 at 22:08)</a>:</h4>
<p>ahh :)</p>



<a name="243091516"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243091516" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243091516">(Jun 17 2021 at 22:08)</a>:</h4>
<p>so in terms of why it has that value</p>



<a name="243091550"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243091550" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243091550">(Jun 17 2021 at 22:08)</a>:</h4>
<p>so it ICEs because there's more than one element</p>



<a name="243091557"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243091557" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243091557">(Jun 17 2021 at 22:09)</a>:</h4>
<p>I believe yes the value is in terms of the definition</p>



<a name="243091576"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243091576" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243091576">(Jun 17 2021 at 22:09)</a>:</h4>
<p>we really should be looking for the element with the right substs I think</p>



<a name="243091584"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243091584" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243091584">(Jun 17 2021 at 22:09)</a>:</h4>
<p>let me look back at that code</p>



<a name="243091588"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243091588" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243091588">(Jun 17 2021 at 22:09)</a>:</h4>
<p>can you send me a link?</p>



<a name="243091593"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243091593" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243091593">(Jun 17 2021 at 22:09)</a>:</h4>
<p>sure</p>



<a name="243091611"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243091611" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243091611">(Jun 17 2021 at 22:09)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/issues/86410">#86410</a></p>



<a name="243091631"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243091631" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243091631">(Jun 17 2021 at 22:09)</a>:</h4>
<p>or well you want a link to that particular section?</p>



<a name="243093220"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243093220" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243093220">(Jun 17 2021 at 22:26)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE/near/243091557">said</a>:</p>
<blockquote>
<p>I believe yes the value is in terms of the definition</p>
</blockquote>
<p>I'm not 100% sure how everything is build up to be honest, I'd need to investigate, but what I was wondering before investigating that is ... if regardless of what the substs are, for the same def_id I get more than one element but all of them give me the same value, does finding the right one even matters?</p>



<a name="243093250"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243093250" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243093250">(Jun 17 2021 at 22:26)</a>:</h4>
<p>I meant, it would matter semantically but I can't see if it creates harm and how</p>



<a name="243093278"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243093278" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243093278">(Jun 17 2021 at 22:26)</a>:</h4>
<p>I guess I really need to investigate how things are build to answer that question :)</p>



<a name="243149333"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243149333" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243149333">(Jun 18 2021 at 11:49)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> I meant -- a link to where the ICE occurs</p>



<a name="243149337"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243149337" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243149337">(Jun 18 2021 at 11:49)</a>:</h4>
<p>but I can reproduce it</p>



<a name="243149462"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243149462" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243149462">(Jun 18 2021 at 11:50)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/pull/86410/files#diff-88ddacabf09eb79ece1dbfada296b5f0312b22bdfeba5013740b4f480e853355R1294">https://github.com/rust-lang/rust/pull/86410/files#diff-88ddacabf09eb79ece1dbfada296b5f0312b22bdfeba5013740b4f480e853355R1294</a></p>



<a name="243159106"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243159106" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243159106">(Jun 18 2021 at 13:17)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> given that we have the <code>opaque_type_key</code>, it seems like we can do a better match, but this is I thnk exactly the code that I wanted to comment better</p>



<a name="243159120"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243159120" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243159120">(Jun 18 2021 at 13:17)</a>:</h4>
<p>I'm having a hard time remembering e.g. the role of <code>concrete_opaque_types</code></p>



<a name="243178447"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243178447" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243178447">(Jun 18 2021 at 15:47)</a>:</h4>
<p>OK, I opened <a href="https://github.com/rust-lang/rust/pull/86437">https://github.com/rust-lang/rust/pull/86437</a> with some comments :)</p>



<a name="243179189"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243179189" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243179189">(Jun 18 2021 at 15:54)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> so I think we can just change <a href="https://github.com/rust-lang/rust/blob/50cc3de2ac37969080e5afb3cada6977eba20533/compiler/rustc_mir/src/borrow_check/type_check/mod.rs#L1293-L1295">this code</a> to do <code>concrete_opaque_types.get(opaque_type_key)</code> here</p>



<a name="243179243"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243179243" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243179243">(Jun 18 2021 at 15:54)</a>:</h4>
<p>let me know if that fixes the ICE :)</p>



<a name="243179320"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243179320" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243179320">(Jun 18 2021 at 15:55)</a>:</h4>
<p>also, please read the docs in <a href="https://github.com/rust-lang/rust/issues/86437">#86437</a> and tell me if they make sense to you</p>



<a name="243204384"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243204384" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243204384">(Jun 18 2021 at 20:21)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE/near/243159106">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="116266">Santiago Pastorino</span> given that we have the <code>opaque_type_key</code>, it seems like we can do a better match, but this is I thnk exactly the code that I wanted to comment better</p>
</blockquote>
<p>agreed on that point, better to correctly match rather than doing something that it is uncertain if works because of some random facts</p>



<a name="243204521"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243204521" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243204521">(Jun 18 2021 at 20:22)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE/near/243178447">said</a>:</p>
<blockquote>
<p>OK, I opened <a href="https://github.com/rust-lang/rust/pull/86437">https://github.com/rust-lang/rust/pull/86437</a> with some comments :)</p>
</blockquote>
<p>reading them</p>



<a name="243204567"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243204567" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243204567">(Jun 18 2021 at 20:23)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE/near/243179189">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="116266">Santiago Pastorino</span> so I think we can just change <a href="https://github.com/rust-lang/rust/blob/50cc3de2ac37969080e5afb3cada6977eba20533/compiler/rustc_mir/src/borrow_check/type_check/mod.rs#L1293-L1295">this code</a> to do <code>concrete_opaque_types.get(opaque_type_key)</code> here</p>
</blockquote>
<p>yes, I guess it shouldn't, I wanted to introduce a regression test for this and that's what I couldn't come up with</p>



<a name="243204702"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243204702" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243204702">(Jun 18 2021 at 20:24)</a>:</h4>
<p>"The <em>liberated</em> form of this would be"</p>



<a name="243204759"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243204759" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243204759">(Jun 18 2021 at 20:24)</a>:</h4>
<p>what's the meaning of liberated? I understand from context what you meant, I guess, but wondering if that terms is something that's used around</p>



<a name="243204823"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243204823" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243204823">(Jun 18 2021 at 20:25)</a>:</h4>
<p>maybe you meant, revealed?</p>



<a name="243205386"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243205386" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243205386">(Jun 18 2021 at 20:30)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116266">Santiago Pastorino</span> <a href="#narrow/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE/near/243204521">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE/near/243178447">said</a>:</p>
<blockquote>
<p>OK, I opened <a href="https://github.com/rust-lang/rust/pull/86437">https://github.com/rust-lang/rust/pull/86437</a> with some comments :)</p>
</blockquote>
<p>reading them</p>
</blockquote>
<p>the comments make sense to me</p>



<a name="243205594"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243205594" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243205594">(Jun 18 2021 at 20:32)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> my main question still is ... I can change the code to use <code>concrete_opaque_types.get(opaque_type_key)</code> but I guess we wanted a regression test before we do that, right?</p>



<a name="243205645"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243205645" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243205645">(Jun 18 2021 at 20:33)</a>:</h4>
<p>I can investigate a bit more how to build one, but wasn't able to come up with something yesterday, maybe if I re-read the code with your comments ...</p>



<a name="243211172"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243211172" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243211172">(Jun 18 2021 at 21:45)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116266">Santiago Pastorino</span> <a href="#narrow/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE/near/243204702">said</a>:</p>
<blockquote>
<p>"The <em>liberated</em> form of this would be"</p>
</blockquote>
<p>it's a term we use in the compiler -- e.g., the <code>liberated_fn_sigs</code></p>



<a name="243211179"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243211179" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243211179">(Jun 18 2021 at 21:45)</a>:</h4>
<p>it describes converting from "bound" regions to "free" regions</p>



<a name="243211188"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243211188" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243211188">(Jun 18 2021 at 21:45)</a>:</h4>
<p>but it also implies the revelead forms of opaque types</p>



<a name="243211243"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243211243" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243211243">(Jun 18 2021 at 21:46)</a>:</h4>
<p>ok, yeah, I got what you meant but wasn't sure if the term was something used along the compiler</p>



<a name="243211244"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243211244" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243211244">(Jun 18 2021 at 21:46)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116266">Santiago Pastorino</span> <a href="#narrow/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE/near/243205594">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> my main question still is ... I can change the code to use <code>concrete_opaque_types.get(opaque_type_key)</code> but I guess we wanted a regression test before we do that, right?</p>
</blockquote>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> I thought we were getting an ICE with the existing tests, right?</p>



<a name="243211254"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243211254" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243211254">(Jun 18 2021 at 21:46)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116266">Santiago Pastorino</span> <a href="#narrow/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE/near/243211243">said</a>:</p>
<blockquote>
<p>ok, yeah, I got what you meant but wasn't sure if the term was something used along the compiler</p>
</blockquote>
<p>it's not a standard term, just something I made up</p>



<a name="243211256"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243211256" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243211256">(Jun 18 2021 at 21:46)</a>:</h4>
<p>but it is used</p>



<a name="243211267"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243211267" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243211267">(Jun 18 2021 at 21:46)</a>:</h4>
<p>so ... you get an ICE if you leave the assert</p>



<a name="243211272"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243211272" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243211272">(Jun 18 2021 at 21:46)</a>:</h4>
<p><a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/struct.TypeckResults.html#structfield.liberated_fn_sigs">https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/struct.TypeckResults.html#structfield.liberated_fn_sigs</a></p>



<a name="243211281"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243211281" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243211281">(Jun 18 2021 at 21:46)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116266">Santiago Pastorino</span> <a href="#narrow/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE/near/243211267">said</a>:</p>
<blockquote>
<p>so ... you get an ICE if you leave the assert</p>
</blockquote>
<p>I want to leave the assert</p>



<a name="243211297"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243211297" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243211297">(Jun 18 2021 at 21:47)</a>:</h4>
<p>I do agree though it'd be good to get a regression test that does the wrong thing</p>



<a name="243211300"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243211300" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243211300">(Jun 18 2021 at 21:47)</a>:</h4>
<p>I'm wodnering if that's actually <em>possble</em></p>



<a name="243211305"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243211305" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243211305">(Jun 18 2021 at 21:47)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE/near/243211297">said</a>:</p>
<blockquote>
<p>I do agree though it'd be good to get a regression test that does the wrong thing</p>
</blockquote>
<p>right</p>



<a name="243211308"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243211308" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243211308">(Jun 18 2021 at 21:47)</a>:</h4>
<p>that's what I wanted</p>



<a name="243211321"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243211321" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243211321">(Jun 18 2021 at 21:47)</a>:</h4>
<p>well ok</p>



<a name="243211332"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243211332" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243211332">(Jun 18 2021 at 21:47)</a>:</h4>
<p>what was the original regression test that we were trying to fix?</p>



<a name="243211372"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243211372" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243211372">(Jun 18 2021 at 21:48)</a>:</h4>
<p>the assert could still live there but the code can be refactored or something and you could still have the issue</p>



<a name="243211421"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243211421" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243211421">(Jun 18 2021 at 21:49)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116266">Santiago Pastorino</span> <a href="#narrow/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE/near/243084898">said</a>:</p>
<blockquote>
<p><div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">type</span> <span class="nc">X</span><span class="o">&lt;</span><span class="n">A</span><span class="p">,</span><span class="w"> </span><span class="n">B</span><span class="o">&gt;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">impl</span><span class="w"> </span><span class="nb">Into</span><span class="o">&lt;</span><span class="n">A</span><span class="o">&gt;</span><span class="p">;</span><span class="w"></span>

<span class="k">fn</span> <span class="nf">f</span><span class="o">&lt;</span><span class="n">T</span><span class="p">,</span><span class="w"> </span><span class="n">Z</span><span class="o">&gt;</span><span class="p">(</span><span class="n">a</span>: <span class="nc">T</span><span class="p">,</span><span class="w"> </span><span class="n">b</span>: <span class="nc">Z</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="p">(</span><span class="n">X</span><span class="o">&lt;</span><span class="n">T</span><span class="p">,</span><span class="w"> </span><span class="n">Z</span><span class="o">&gt;</span><span class="p">,</span><span class="w"> </span><span class="n">X</span><span class="o">&lt;</span><span class="n">Z</span><span class="p">,</span><span class="w"> </span><span class="n">T</span><span class="o">&gt;</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="p">(</span><span class="n">b</span><span class="p">,</span><span class="w"> </span><span class="n">a</span><span class="p">)</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div><br>
</p>
</blockquote>
<p>so I think my messages starting here <span aria-label="point up" class="emoji emoji-1f446" role="img" title="point up">:point_up:</span> are more or less close to what the test should be</p>



<a name="243211440"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243211440" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243211440">(Jun 18 2021 at 21:49)</a>:</h4>
<p>and the original example was similar to that one</p>



<a name="243211508"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243211508" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243211508">(Jun 18 2021 at 21:50)</a>:</h4>
<p>the test we want is one where you have a list with <code>[A, B]</code> and <code>[B, A]</code> as substs whose values on the map are different</p>



<a name="243211529"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243211529" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243211529">(Jun 18 2021 at 21:50)</a>:</h4>
<p>but I'm getting the same values on the map for both of them as you can see in this message ...</p>



<a name="243211539"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243211539" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243211539">(Jun 18 2021 at 21:50)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116266">Santiago Pastorino</span> <a href="#narrow/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE/near/243084945">said</a>:</p>
<blockquote>
<p><div class="codehilite"><pre><span></span><code>DEBUG rustc_mir::borrow_check::type_check CHECK: concrete_opaque_types = VecMap([(OpaqueTypeKey { def_id: DefId(0:6 ~ multiple_def_uses_in_one_fn[317d]::X::{opaque#0}), substs: [T, Z] }, B), (OpaqueTypeKey { def_id: DefId(0:6 ~ multip    le_def_uses_in_one_fn[317d]::X::{opaque#0}), substs: [Z, T] }, B)])
DEBUG rustc_mir::borrow_check::type_check CHECK: opaque_type_key = OpaqueTypeKey { def_id: DefId(0:6 ~ multiple_def_uses_in_one_fn[317d]::X::{opaque#0}), substs: [T, Z] }
DEBUG rustc_mir::borrow_check::type_check CHECK: concrete_ty = B
DEBUG rustc_mir::borrow_check::renumber renumber_regions(value=Z)
DEBUG rustc_mir::borrow_check::type_check eq_opaque_type_and_type: concrete_ty=B=_ opaque_defn_ty=Z
DEBUG rustc_mir::borrow_check::type_check CHECK: concrete_opaque_types = VecMap([(OpaqueTypeKey { def_id: DefId(0:6 ~ multiple_def_uses_in_one_fn[317d]::X::{opaque#0}), substs: [T, Z] }, B), (OpaqueTypeKey { def_id: DefId(0:6 ~ multip    le_def_uses_in_one_fn[317d]::X::{opaque#0}), substs: [Z, T] }, B)])
DEBUG rustc_mir::borrow_check::type_check CHECK: opaque_type_key = OpaqueTypeKey { def_id: DefId(0:6 ~ multiple_def_uses_in_one_fn[317d]::X::{opaque#0}), substs: [Z, T] }
DEBUG rustc_mir::borrow_check::type_check CHECK: concrete_ty = B
</code></pre></div><br>
</p>
</blockquote>
<p><span aria-label="point up" class="emoji emoji-1f446" role="img" title="point up">:point_up:</span></p>



<a name="243211559"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243211559" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243211559">(Jun 18 2021 at 21:51)</a>:</h4>
<p><code>concrete_ty = B</code> twice</p>



<a name="243211642"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243211642" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243211642">(Jun 18 2021 at 21:52)</a>:</h4>
<p>so there opaque_type_key's substs are [T, Z] and the concrete_ty that comes from concrete_opaque_types is B</p>



<a name="243211652"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243211652" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243211652">(Jun 18 2021 at 21:52)</a>:</h4>
<p>and in the following case is [Z, T] but also concrete_ty is B</p>



<a name="243211678"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243211678" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243211678">(Jun 18 2021 at 21:52)</a>:</h4>
<p>if I can get an example where the second concrete_ty is something other than B, I'd be creating the test I need</p>



<a name="243211717"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243211717" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243211717">(Jun 18 2021 at 21:53)</a>:</h4>
<p>because, the old code does a find using the def_id so it grabs the first value (both matches), but I really want to grab the exact match (def_id + substs), in one of those cases would be the second value</p>



<a name="243211797"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243211797" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243211797">(Jun 18 2021 at 21:54)</a>:</h4>
<p>ok so</p>



<a name="243211806"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243211806" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243211806">(Jun 18 2021 at 21:54)</a>:</h4>
<p>I think to get it to do the wrong thing</p>



<a name="243211812"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243211812" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243211812">(Jun 18 2021 at 21:54)</a>:</h4>
<p>it is going to have to involve regions</p>



<a name="243211820"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243211820" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243211820">(Jun 18 2021 at 21:54)</a>:</h4>
<p>because the borrow check is <em>just</em> inferring region info</p>



<a name="243211822"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243211822" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243211822">(Jun 18 2021 at 21:54)</a>:</h4>
<p>the rest is figured out by typeck</p>



<a name="243211829"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243211829" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243211829">(Jun 18 2021 at 21:54)</a>:</h4>
<p>one challenge is that typeck does still do some region analysis</p>



<a name="243211837"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243211837" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243211837">(Jun 18 2021 at 21:55)</a>:</h4>
<p>oh wait</p>



<a name="243211847"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243211847" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243211847">(Jun 18 2021 at 21:55)</a>:</h4>
<p>there might be some flag to skip that</p>



<a name="243211858"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243211858" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243211858">(Jun 18 2021 at 21:55)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE/near/243211812">said</a>:</p>
<blockquote>
<p>it is going to have to involve regions</p>
</blockquote>
<p>makes sense</p>



<a name="243211922"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243211922" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243211922">(Jun 18 2021 at 21:56)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE/near/243211847">said</a>:</p>
<blockquote>
<p>there might be some flag to skip that</p>
</blockquote>
<p>that would be cool :)</p>



<a name="243212037"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243212037" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243212037">(Jun 18 2021 at 21:58)</a>:</h4>
<p>ok, wait</p>



<a name="243212041"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243212041" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243212041">(Jun 18 2021 at 21:58)</a>:</h4>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="cp">#![feature(min_type_alias_impl_trait)]</span><span class="w"></span>

<span class="k">type</span> <span class="nc">X</span><span class="o">&lt;'</span><span class="na">a</span><span class="p">,</span><span class="w"> </span><span class="o">'</span><span class="na">b</span><span class="o">&gt;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">impl</span><span class="w"> </span><span class="n">std</span>::<span class="n">fmt</span>::<span class="n">Debug</span><span class="p">;</span><span class="w"></span>

<span class="k">fn</span> <span class="nf">f</span><span class="o">&lt;'</span><span class="na">t</span><span class="p">,</span><span class="w"> </span><span class="o">'</span><span class="na">u</span><span class="o">&gt;</span><span class="p">(</span><span class="n">a</span>: <span class="kp">&amp;</span><span class="o">'</span><span class="na">t</span> <span class="kt">u32</span><span class="p">,</span><span class="w"> </span><span class="n">b</span>: <span class="kp">&amp;</span><span class="o">'</span><span class="na">u</span> <span class="kt">u32</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="p">(</span><span class="n">X</span><span class="o">&lt;'</span><span class="na">t</span><span class="p">,</span><span class="w"> </span><span class="o">'</span><span class="na">u</span><span class="o">&gt;</span><span class="p">,</span><span class="w"> </span><span class="n">X</span><span class="o">&lt;'</span><span class="na">u</span><span class="p">,</span><span class="w"> </span><span class="o">'</span><span class="na">t</span><span class="o">&gt;</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="p">(</span><span class="n">a</span><span class="p">,</span><span class="w"> </span><span class="n">b</span><span class="p">)</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="243212056"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243212056" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243212056">(Jun 18 2021 at 21:58)</a>:</h4>
<p>so if <code>X&lt;'a, 'b&gt; = &amp;'a u32</code></p>



<a name="243212062"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243212062" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243212062">(Jun 18 2021 at 21:58)</a>:</h4>
<p>no wait</p>



<a name="243212072"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243212072" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243212072">(Jun 18 2021 at 21:58)</a>:</h4>
<p>ok so</p>



<a name="243212075"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243212075" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243212075">(Jun 18 2021 at 21:58)</a>:</h4>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="cp">#![feature(min_type_alias_impl_trait)]</span><span class="w"></span>

<span class="k">type</span> <span class="nc">X</span><span class="o">&lt;'</span><span class="na">a</span><span class="p">,</span><span class="w"> </span><span class="o">'</span><span class="na">b</span><span class="o">&gt;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">impl</span><span class="w"> </span><span class="n">std</span>::<span class="n">fmt</span>::<span class="n">Debug</span><span class="p">;</span><span class="w"></span>

<span class="k">fn</span> <span class="nf">f</span><span class="o">&lt;'</span><span class="na">t</span><span class="p">,</span><span class="w"> </span><span class="o">'</span><span class="na">u</span><span class="o">&gt;</span><span class="p">(</span><span class="n">a</span>: <span class="kp">&amp;</span><span class="o">'</span><span class="na">t</span> <span class="kt">u32</span><span class="p">,</span><span class="w"> </span><span class="n">b</span>: <span class="kp">&amp;</span><span class="o">'</span><span class="na">u</span> <span class="kt">u32</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="p">(</span><span class="n">X</span><span class="o">&lt;'</span><span class="na">t</span><span class="p">,</span><span class="w"> </span><span class="o">'</span><span class="na">u</span><span class="o">&gt;</span><span class="p">,</span><span class="w"> </span><span class="n">X</span><span class="o">&lt;'</span><span class="na">u</span><span class="p">,</span><span class="w"> </span><span class="o">'</span><span class="na">t</span><span class="o">&gt;</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="p">(</span><span class="n">a</span><span class="p">,</span><span class="w"> </span><span class="n">a</span><span class="p">)</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="243212080"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243212080" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243212080">(Jun 18 2021 at 21:58)</a>:</h4>
<p>this test should not pass, but it does</p>



<a name="243212112"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243212112" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243212112">(Jun 18 2021 at 21:59)</a>:</h4>
<p>in the first case, we require that <code>X&lt;'t, 'u&gt; = &amp;'t u32</code>, which means <code>type X&lt;'a, 'b&gt; = &amp;'a u32</code></p>



<a name="243212135"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243212135" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243212135">(Jun 18 2021 at 21:59)</a>:</h4>
<p>ok, let me try this out</p>



<a name="243212144"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243212144" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243212144">(Jun 18 2021 at 21:59)</a>:</h4>
<p>in the first case, we require that <code>X&lt;'u, 't&gt; = &amp;'t u32</code>, which means <code>type X&lt;'a, 'b&gt; = &amp;'b u32</code></p>



<a name="243212152"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243212152" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243212152">(Jun 18 2021 at 22:00)</a>:</h4>
<p>which are different :)</p>



<a name="243212380"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243212380" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243212380">(Jun 18 2021 at 22:02)</a>:</h4>
<p>yes, makes sense</p>



<a name="243212395"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243212395" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243212395">(Jun 18 2021 at 22:02)</a>:</h4>
<p>that's what I was trying to do exactly but using types</p>



<a name="243212430"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243212430" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243212430">(Jun 18 2021 at 22:03)</a>:</h4>
<p>as you've said, we are borrow checking here so lifetimes are what I want in this case</p>



<a name="243212434"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243212434" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243212434">(Jun 18 2021 at 22:03)</a>:</h4>
<p>thanks</p>



<a name="243212453"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243212453" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243212453">(Jun 18 2021 at 22:03)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> on your branch, if you have one, does it get an error?</p>



<a name="243212457"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243212457" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243212457">(Jun 18 2021 at 22:03)</a>:</h4>
<p>or at least an ICE :)</p>



<a name="243212496"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243212496" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243212496">(Jun 18 2021 at 22:04)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE/near/243211272">said</a>:</p>
<blockquote>
<p><a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/struct.TypeckResults.html#structfield.liberated_fn_sigs">https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/struct.TypeckResults.html#structfield.liberated_fn_sigs</a></p>
</blockquote>
<p>maybe I should lnk to this in the comment where I use the phrase "liberated"</p>



<a name="243212542"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243212542" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243212542">(Jun 18 2021 at 22:04)</a>:</h4>
<p>or to <a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/context/struct.TyCtxt.html#method.liberate_late_bound_regions"><code>liberate_late_bound_regions</code></a></p>



<a name="243212560"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243212560" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243212560">(Jun 18 2021 at 22:04)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE/near/243212453">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="116266">Santiago Pastorino</span> on your branch, if you have one, does it get an error?</p>
</blockquote>
<p>I have some local changes but I can push everything in a bit</p>



<a name="243212619"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243212619" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243212619">(Jun 18 2021 at 22:05)</a>:</h4>
<p>so ... if I call ...</p>



<a name="243212667"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243212667" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243212667">(Jun 18 2021 at 22:06)</a>:</h4>
<p><code>get_value_matching(|(key, _)| key.def_id == opaque_type_key.def_id)</code> I get an ICE</p>



<a name="243212682"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243212682" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243212682">(Jun 18 2021 at 22:06)</a>:</h4>
<p><code>any_value_matching(|(key, _)| key.def_id == opaque_type_key.def_id)</code> it compiles</p>



<a name="243212690"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243212690" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243212690">(Jun 18 2021 at 22:06)</a>:</h4>
<p>but I should just <code>get</code> using the whole key</p>



<a name="243212693"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243212693" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243212693">(Jun 18 2021 at 22:06)</a>:</h4>
<p>let me see what happens if I do so</p>



<a name="243212896"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243212896" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243212896">(Jun 18 2021 at 22:09)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> doing that I get ...</p>



<a name="243212901"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243212901" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243212901">(Jun 18 2021 at 22:10)</a>:</h4>
<div class="codehilite"><pre><span></span><code>error[E0720]: cannot resolve opaque type
  --&gt; library/core/src/iter/adapters/enumerate.rs:80:14
   |
80 |         ) -&gt; impl FnMut(Acc, T) -&gt; R + &#39;a {
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ recursive opaque type

error[E0720]: cannot resolve opaque type
  --&gt; library/core/src/iter/adapters/filter.rs:43:6
   |
43 | ) -&gt; impl FnMut(Acc, T) -&gt; R + &#39;a {
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ recursive opaque type

error[E0720]: cannot resolve opaque type
  --&gt; library/core/src/iter/adapters/filter_map.rs:45:6
   |
45 | ) -&gt; impl FnMut(Acc, T) -&gt; R + &#39;a {
   |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ recursive opaque type

error[E0720]: cannot resolve opaque type
  --&gt; library/core/src/iter/adapters/filter_map.rs:99:14
   |
99 |         ) -&gt; impl FnMut((), T) -&gt; ControlFlow&lt;B&gt; + &#39;_ {
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ recursive opaque type

error[E0720]: cannot resolve opaque type
   --&gt; library/core/src/iter/adapters/flatten.rs:302:14
    |
302 |         ) -&gt; impl FnMut(Acc, T) -&gt; R + &#39;a {
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ recursive opaque type

error[E0720]: cannot resolve opaque type
   --&gt; library/core/src/iter/adapters/flatten.rs:335:14
    |
335 |         ) -&gt; impl FnMut(Acc, T) -&gt; Acc + &#39;_ {
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ recursive opaque type

error[E0720]: cannot resolve opaque type
   --&gt; library/core/src/iter/adapters/flatten.rs:391:14
    |
391 |         ) -&gt; impl FnMut(Acc, T) -&gt; R + &#39;a
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ recursive opaque type

error[E0720]: cannot resolve opaque type
   --&gt; library/core/src/iter/adapters/flatten.rs:427:14
    |
427 |         ) -&gt; impl FnMut(Acc, T) -&gt; Acc + &#39;_
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ recursive opaque type
</code></pre></div>



<a name="243212974"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243212974" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243212974">(Jun 18 2021 at 22:10)</a>:</h4>
<p>in code like ...</p>



<a name="243212995"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243212995" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243212995">(Jun 18 2021 at 22:11)</a>:</h4>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="w">    </span><span class="cp">#[inline]</span><span class="w"></span>
<span class="w">    </span><span class="k">fn</span> <span class="nf">try_fold</span><span class="o">&lt;</span><span class="n">Acc</span><span class="p">,</span><span class="w"> </span><span class="n">Fold</span><span class="p">,</span><span class="w"> </span><span class="n">R</span><span class="o">&gt;</span><span class="p">(</span><span class="o">&amp;</span><span class="k">mut</span><span class="w"> </span><span class="bp">self</span><span class="p">,</span><span class="w"> </span><span class="n">init</span>: <span class="nc">Acc</span><span class="p">,</span><span class="w"> </span><span class="n">fold</span>: <span class="nc">Fold</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">R</span><span class="w"></span>
<span class="w">    </span><span class="k">where</span><span class="w"></span>
<span class="w">        </span><span class="bp">Self</span>: <span class="nb">Sized</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="n">Fold</span>: <span class="nb">FnMut</span><span class="p">(</span><span class="n">Acc</span><span class="p">,</span><span class="w"> </span><span class="bp">Self</span>::<span class="n">Item</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">R</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="n">R</span>: <span class="nc">Try</span><span class="o">&lt;</span><span class="n">Output</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">Acc</span><span class="o">&gt;</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="p">{</span><span class="w"></span>
<span class="w">        </span><span class="cp">#[inline]</span><span class="w"></span>
<span class="w">        </span><span class="k">fn</span> <span class="nf">enumerate</span><span class="o">&lt;'</span><span class="na">a</span><span class="p">,</span><span class="w"> </span><span class="n">T</span><span class="p">,</span><span class="w"> </span><span class="n">Acc</span><span class="p">,</span><span class="w"> </span><span class="n">R</span><span class="o">&gt;</span><span class="p">(</span><span class="w"></span>
<span class="w">            </span><span class="n">count</span>: <span class="kp">&amp;</span><span class="o">'</span><span class="na">a</span> <span class="nc">mut</span><span class="w"> </span><span class="kt">usize</span><span class="p">,</span><span class="w"></span>
<span class="w">            </span><span class="k">mut</span><span class="w"> </span><span class="n">fold</span>: <span class="nc">impl</span><span class="w"> </span><span class="nb">FnMut</span><span class="p">(</span><span class="n">Acc</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="kt">usize</span><span class="p">,</span><span class="w"> </span><span class="n">T</span><span class="p">))</span><span class="w"> </span>-&gt; <span class="nc">R</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="o">'</span><span class="na">a</span><span class="p">,</span><span class="w"></span>
<span class="w">        </span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">impl</span><span class="w"> </span><span class="nb">FnMut</span><span class="p">(</span><span class="n">Acc</span><span class="p">,</span><span class="w"> </span><span class="n">T</span><span class="p">)</span><span class="w"> </span>-&gt; <span class="nc">R</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="o">'</span><span class="na">a</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">            </span><span class="cp">#[rustc_inherit_overflow_checks]</span><span class="w"></span>
<span class="w">            </span><span class="k">move</span><span class="w"> </span><span class="o">|</span><span class="n">acc</span><span class="p">,</span><span class="w"> </span><span class="n">item</span><span class="o">|</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                </span><span class="kd">let</span><span class="w"> </span><span class="n">acc</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">fold</span><span class="p">(</span><span class="n">acc</span><span class="p">,</span><span class="w"> </span><span class="p">(</span><span class="o">*</span><span class="n">count</span><span class="p">,</span><span class="w"> </span><span class="n">item</span><span class="p">));</span><span class="w"></span>
<span class="w">                </span><span class="o">*</span><span class="n">count</span><span class="w"> </span><span class="o">+=</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span><span class="w"></span>
<span class="w">                </span><span class="n">acc</span><span class="w"></span>
<span class="w">            </span><span class="p">}</span><span class="w"></span>
<span class="w">        </span><span class="p">}</span><span class="w"></span>

<span class="w">        </span><span class="bp">self</span><span class="p">.</span><span class="n">iter</span><span class="p">.</span><span class="n">try_fold</span><span class="p">(</span><span class="n">init</span><span class="p">,</span><span class="w"> </span><span class="n">enumerate</span><span class="p">(</span><span class="o">&amp;</span><span class="k">mut</span><span class="w"> </span><span class="bp">self</span><span class="p">.</span><span class="n">count</span><span class="p">,</span><span class="w"> </span><span class="n">fold</span><span class="p">))</span><span class="w"></span>
<span class="w">    </span><span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="243213006"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243213006" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243213006">(Jun 18 2021 at 22:11)</a>:</h4>
<p>huh</p>



<a name="243213013"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243213013" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243213013">(Jun 18 2021 at 22:11)</a>:</h4>
<p>unsure why it doesn't like fns, inside fns</p>



<a name="243213067"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243213067" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243213067">(Jun 18 2021 at 22:12)</a>:</h4>
<p>anyway, can debug this</p>



<a name="243213079"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243213079" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243213079">(Jun 18 2021 at 22:12)</a>:</h4>
<p>not right now but I will</p>



<a name="243213097"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243213097" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243213097">(Jun 18 2021 at 22:13)</a>:</h4>
<p>but I guess substs for those lifetimes don't match?</p>



<a name="243213108"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243213108" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243213108">(Jun 18 2021 at 22:13)</a>:</h4>
<p>unsure if they were already renumbered?</p>



<a name="243213160"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243213160" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243213160">(Jun 18 2021 at 22:14)</a>:</h4>
<p>I meant, what I have in the key and what really is in the map</p>



<a name="243214546"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243214546" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243214546">(Jun 18 2021 at 22:45)</a>:</h4>
<p>did you print out what the substs say?</p>



<a name="243214588"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243214588" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243214588">(Jun 18 2021 at 22:46)</a>:</h4>
<p>i was wondering if they might not match for some reason</p>



<a name="243237481"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243237481" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243237481">(Jun 19 2021 at 08:29)</a>:</h4>
<p>I filed <a href="https://github.com/rust-lang/rust/issues/86465">https://github.com/rust-lang/rust/issues/86465</a> for this example</p>



<a name="243238242"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243238242" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243238242">(Jun 19 2021 at 08:50)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116266">Santiago Pastorino</span> <a href="#narrow/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE/near/243213108">said</a>:</p>
<blockquote>
<p>unsure if they were already renumbered?</p>
</blockquote>
<p>yes, that's the problem</p>



<a name="243238244"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243238244" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243238244">(Jun 19 2021 at 08:50)</a>:</h4>
<p>I did a bit of digging</p>



<a name="243238248"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243238248" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243238248">(Jun 19 2021 at 08:50)</a>:</h4>
<p>so we either have to (a) renumber the keys in the <code>concrete_opaque_types</code> map</p>



<a name="243238252"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243238252" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243238252">(Jun 19 2021 at 08:50)</a>:</h4>
<p>or (b) convert the <code>opaque_type_key</code> back</p>



<a name="243238253"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243238253" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243238253">(Jun 19 2021 at 08:50)</a>:</h4>
<p>I think (a) is probably easier</p>



<a name="243238264"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243238264" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243238264">(Jun 19 2021 at 08:51)</a>:</h4>
<p>the <a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir/borrow_check/universal_regions/struct.UniversalRegionIndices.html#method.fold_to_region_vids">https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir/borrow_check/universal_regions/struct.UniversalRegionIndices.html#method.fold_to_region_vids</a> could be helpful, roughly as <span class="user-mention" data-user-id="328097">@BN</span> did in <a href="https://github.com/rust-lang/rust/issues/85755">#85755</a></p>



<a name="243973246"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243973246" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243973246">(Jun 25 2021 at 21:29)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> you told me to fix this problem here <a href="https://github.com/spastorino/rust/blob/246571a846e29691bd535d531365acd318857207/compiler/rustc_mir/src/borrow_check/type_check/mod.rs#L969">https://github.com/spastorino/rust/blob/246571a846e29691bd535d531365acd318857207/compiler/rustc_mir/src/borrow_check/type_check/mod.rs#L969</a></p>



<a name="243973457"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243973457" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243973457">(Jun 25 2021 at 21:31)</a>:</h4>
<p>but I was wondering ... hmm I'm not sure exactly what were you planning</p>



<a name="243973735"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243973735" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243973735">(Jun 25 2021 at 21:34)</a>:</h4>
<p>I meant, because at that point <code>opaque_type_values</code> are still empty</p>



<a name="243973754"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243973754" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243973754">(Jun 25 2021 at 21:34)</a>:</h4>
<p>maybe I misunderstood what you were trying to say</p>



<a name="243974332"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243974332" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243974332">(Jun 25 2021 at 21:40)</a>:</h4>
<p>I guess the conversion could be done here <a href="https://github.com/spastorino/rust/blob/50cc3de2ac37969080e5afb3cada6977eba20533/compiler/rustc_mir/src/borrow_check/type_check/mod.rs#L186">https://github.com/spastorino/rust/blob/50cc3de2ac37969080e5afb3cada6977eba20533/compiler/rustc_mir/src/borrow_check/type_check/mod.rs#L186</a></p>



<a name="243974377"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243974377" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243974377">(Jun 25 2021 at 21:41)</a>:</h4>
<p>but I'm not sure what did you mean when you said do it in <code>TypeCheck::new</code> and how did you mean to do it there</p>



<a name="243975394"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243975394" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243975394">(Jun 25 2021 at 21:53)</a>:</h4>
<p>well, it seems that what I'm saying doesn't work :)</p>



<a name="243975402"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243975402" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243975402">(Jun 25 2021 at 21:53)</a>:</h4>
<p>have pushed what I have <a href="https://github.com/rust-lang/rust/issues/86410">#86410</a></p>



<a name="243975429"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/243975429" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#243975429">(Jun 25 2021 at 21:53)</a>:</h4>
<p>I'd need to take a deeper look into this because I've gone over it quickly</p>



<a name="244156248"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244156248" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244156248">(Jun 28 2021 at 14:50)</a>:</h4>
<p>I'm trying to remember, <span class="user-mention" data-user-id="116266">@Santiago Pastorino</span></p>



<a name="244156288"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244156288" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244156288">(Jun 28 2021 at 14:50)</a>:</h4>
<p>Let me start with the "naïve" fix</p>



<a name="244156444"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244156444" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244156444">(Jun 28 2021 at 14:51)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> <span aria-label="wave" class="emoji emoji-1f44b" role="img" title="wave">:wave:</span></p>



<a name="244156456"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244156456" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244156456">(Jun 28 2021 at 14:51)</a>:</h4>
<p>I think <a href="https://github.com/rust-lang/rust/issues/86410">#86410</a> has the naive fix</p>



<a name="244156497"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244156497" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244156497">(Jun 28 2021 at 14:51)</a>:</h4>
<p>but it doesn't compile, I needed to just take a look and fix the compilation error</p>



<a name="244156511"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244156511" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244156511">(Jun 28 2021 at 14:51)</a>:</h4>
<p>just did something quickly and pushed</p>



<a name="244156520"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244156520" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244156520">(Jun 28 2021 at 14:51)</a>:</h4>
<p>need to check</p>



<a name="244156600"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244156600" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244156600">(Jun 28 2021 at 14:52)</a>:</h4>
<p>I see; yes, I believe that is the naive fix</p>



<a name="244156692"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244156692" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244156692">(Jun 28 2021 at 14:52)</a>:</h4>
<p>I think what I was suggesting is that you could do that same thing</p>



<a name="244156699"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244156699" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244156699">(Jun 28 2021 at 14:52)</a>:</h4>
<p>but you could do it <em>earlier</em></p>



<a name="244156703"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244156703" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244156703">(Jun 28 2021 at 14:52)</a>:</h4>
<p>and cache the result</p>



<a name="244156737"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244156737" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244156737">(Jun 28 2021 at 14:52)</a>:</h4>
<p><code>let concrete_opaque_types = &amp;tcx.typeck(anon_owner_def_id).concrete_opaque_types;</code></p>



<a name="244156760"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244156760" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244156760">(Jun 28 2021 at 14:53)</a>:</h4>
<p>this is independent of all the parameters to that function</p>



<a name="244156772"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244156772" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244156772">(Jun 28 2021 at 14:53)</a>:</h4>
<p>so <code>concrete_opaque_types</code> could be stored in a field on the <code>TypeChecker</code></p>



<a name="244156799"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244156799" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244156799">(Jun 28 2021 at 14:53)</a>:</h4>
<p>as for why it doesn't build, you just need</p>



<a name="244156824"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244156824" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244156824">(Jun 28 2021 at 14:53)</a>:</h4>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="kd">let</span><span class="w"> </span><span class="n">concrete_opaque_types</span>: <span class="nc">VecMap</span><span class="o">&lt;</span><span class="n">_</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="o">&gt;</span><span class="w"></span>
</code></pre></div>



<a name="244156841"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244156841" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244156841">(Jun 28 2021 at 14:53)</a>:</h4>
<p>or something like that</p>



<a name="244157117"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244157117" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244157117">(Jun 28 2021 at 14:55)</a>:</h4>
<p>yes</p>



<a name="244157134"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244157134" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244157134">(Jun 28 2021 at 14:55)</a>:</h4>
<p>I've already done that</p>



<a name="244157139"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244157139" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244157139">(Jun 28 2021 at 14:55)</a>:</h4>
<p>lol :P</p>



<a name="244157155"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244157155" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244157155">(Jun 28 2021 at 14:55)</a>:</h4>
<p>I think there's another problem</p>



<a name="244157161"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244157161" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244157161">(Jun 28 2021 at 14:55)</a>:</h4>
<p>let me see</p>



<a name="244157260"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244157260" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244157260">(Jun 28 2021 at 14:56)</a>:</h4>
<p>I was doing this the saturday meanwhile my daughter was around :)</p>



<a name="244157279"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244157279" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244157279">(Jun 28 2021 at 14:56)</a>:</h4>
<p>let me re-check and push again or something</p>



<a name="244157313"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244157313" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244157313">(Jun 28 2021 at 14:56)</a>:</h4>
<p>ohh I see</p>



<a name="244157317"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244157317" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244157317">(Jun 28 2021 at 14:56)</a>:</h4>
<div class="codehilite"><pre><span></span><code>error: internal compiler error: compiler/rustc_mir/src/borrow_check/universal_regions.rs:782:36: cannot convert `ReErased` to a region vid

thread &#39;rustc&#39; panicked at &#39;Box&lt;dyn Any&gt;&#39;, compiler/rustc_errors/src/lib.rs:1007:9
stack backtrace:
   0: std::panicking::begin_panic
             at ./library/std/src/panicking.rs:541:12
   1: std::panic::panic_any
             at ./library/std/src/panic.rs:60:5
   2: rustc_errors::HandlerInner::bug
             at ./compiler/rustc_errors/src/lib.rs:1007:9
   3: rustc_errors::Handler::bug
             at ./compiler/rustc_errors/src/lib.rs:715:9
   4: rustc_middle::util::bug::opt_span_bug_fmt::{{closure}}
             at ./compiler/rustc_middle/src/util/bug.rs:34:34
   5: rustc_middle::ty::context::tls::with_opt::{{closure}}
             at ./compiler/rustc_middle/src/ty/context.rs:1806:40
   6: rustc_middle::ty::context::tls::with_context_opt
             at ./compiler/rustc_middle/src/ty/context.rs:1758:22
   7: rustc_middle::ty::context::tls::with_opt
             at ./compiler/rustc_middle/src/ty/context.rs:1806:9
   8: rustc_middle::util::bug::opt_span_bug_fmt
             at ./compiler/rustc_middle/src/util/bug.rs:30:5
   9: rustc_middle::util::bug::bug_fmt
             at ./compiler/rustc_middle/src/util/bug.rs:14:5
  10: rustc_mir::borrow_check::universal_regions::UniversalRegionIndices::to_region_vid::{{closure}}
             at ./compiler/rustc_mir/src/borrow_check/universal_regions.rs:782:36
  11: core::option::Option&lt;T&gt;::unwrap_or_else
             at ./library/core/src/option.rs:429:21
  12: rustc_mir::borrow_check::universal_regions::UniversalRegionIndices::to_region_vid
             at ./compiler/rustc_mir/src/borrow_check/universal_regions.rs:779:14
  13: rustc_mir::borrow_check::universal_regions::UniversalRegionIndices::fold_to_region_vids::{{closure}}
             at ./compiler/rustc_mir/src/borrow_check/universal_regions.rs:793:37
  14: &lt;rustc_middle::ty::fold::RegionFolder as rustc_middle::ty::fold::TypeFolder&gt;::fold_region
             at ./compiler/rustc_middle/src/ty/fold.rs:437:17
  15: rustc_middle::ty::structural_impls::&lt;impl rustc_middle::ty::fold::TypeFoldable for &amp;rustc_middle::ty::sty::RegionKind&gt;::fold_with
             at ./compiler/rustc_middle/src/ty/structural_impls.rs:957:9
  16: &lt;rustc_middle::ty::subst::GenericArg as rustc_middle::ty::fold::TypeFoldable&gt;::super_fold_with
             at ./compiler/rustc_middle/src/ty/subst.rs:158:45
  17: rustc_middle::ty::fold::TypeFoldable::fold_with
             at ./compiler/rustc_middle/src/ty/fold.rs:51:9
  18: rustc_middle::ty::subst::&lt;impl rustc_middle::ty::fold::TypeFoldable for &amp;rustc_middle::ty::list::List&lt;rustc_middle::ty::subst::GenericArg&gt;&gt;::super_fold_with::{{closure}}
             at ./compiler/rustc_middle/src/ty/subst.rs:390:68
  19: core::ops::function::impls::&lt;impl core::ops::function::FnOnce&lt;A&gt; for &amp;mut F&gt;::call_once
             at ./library/core/src/ops/function.rs:280:13
  20: core::option::Option&lt;T&gt;::map
             at ./library/core/src/option.rs:489:29
  21: &lt;core::iter::adapters::map::Map&lt;I,F&gt; as core::iter::traits::iterator::Iterator&gt;::next
             at ./library/core/src/iter/adapters/map.rs:101:9
  22: &lt;smallvec::SmallVec&lt;A&gt; as core::iter::traits::collect::Extend&lt;&lt;A as smallvec::Array&gt;::Item&gt;&gt;::extend
             at /home/santiago/.cargo/registry/src/github.com-1ecc6299db9ec823/smallvec-1.6.1/src/lib.rs:1663:36
  23: &lt;smallvec::SmallVec&lt;A&gt; as core::iter::traits::collect::FromIterator&lt;&lt;A as smallvec::Array&gt;::Item&gt;&gt;::from_iter
             at /home/santiago/.cargo/registry/src/github.com-1ecc6299db9ec823/smallvec-1.6.1/src/lib.rs:1648:9
  24: core::iter::traits::iterator::Iterator::collect
             at ./library/core/src/iter/traits/iterator.rs:1748:9
  25: rustc_middle::ty::subst::&lt;impl rustc_middle::ty::fold::TypeFoldable for &amp;rustc_middle::ty::list::List&lt;rustc_middle::ty::subst::GenericArg&gt;&gt;::super_fold_with
             at ./compiler/rustc_middle/src/ty/subst.rs:390:48
  26: rustc_middle::ty::fold::TypeFoldable::fold_with
             at ./compiler/rustc_middle/src/ty/fold.rs:51:9
  27: rustc_middle::ty::structural_impls::&lt;impl rustc_middle::ty::fold::TypeFoldable for &amp;rustc_middle::ty::TyS&gt;::super_fold_with
             at ./compiler/rustc_middle/src/ty/structural_impls.rs:878:58
  28: rustc_middle::ty::fold::TypeFolder::fold_ty
             at ./compiler/rustc_middle/src/ty/fold.rs:174:9
  29: rustc_middle::ty::structural_impls::&lt;impl rustc_middle::ty::fold::TypeFoldable for &amp;rustc_middle::ty::TyS&gt;::fold_with
             at ./compiler/rustc_middle/src/ty/structural_impls.rs:901:9
  30: rustc_middle::ty::fold::&lt;impl rustc_middle::ty::context::TyCtxt&gt;::fold_regions
             at ./compiler/rustc_middle/src/ty/fold.rs:274:9
  31: rustc_mir::borrow_check::universal_regions::UniversalRegionIndices::fold_to_region_vids
             at ./compiler/rustc_mir/src/borrow_check/universal_regions.rs:792:9
  32: rustc_mir::borrow_check::type_check::TypeChecker::eq_opaque_type_and_type::{{closure}}
             at ./compiler/rustc_mir/src/borrow_check/type_check/mod.rs:1281:21
  33: core::iter::adapters::map::map_fold::{{closure}}
             at ./library/core/src/iter/adapters/map.rs:82:28
  34: core::iter::traits::iterator::Iterator::fold
             at ./library/core/src/iter/traits/iterator.rs:2173:21
  35: &lt;core::iter::adapters::map::Map&lt;I,F&gt; as core::iter::traits::iterator::Iterator&gt;::fold
             at ./library/core/src/iter/adapters/map.rs:122:9
  36: core::iter::traits::iterator::Iterator::for_each
             at ./library/core/src/iter/traits/iterator.rs:736:9
  37: &lt;alloc::vec::Vec&lt;T,A&gt; as alloc::vec::spec_extend::SpecExtend&lt;T,I&gt;&gt;::spec_extend
             at ./library/alloc/src/vec/spec_extend.rs:40:17
  38: &lt;alloc::vec::Vec&lt;T&gt; as alloc::vec::spec_from_iter_nested::SpecFromIterNested&lt;T,I&gt;&gt;::from_iter
             at ./library/alloc/src/vec/spec_from_iter_nested.rs:56:9
  39: &lt;alloc::vec::Vec&lt;T&gt; as alloc::vec::spec_from_iter::SpecFromIter&lt;T,I&gt;&gt;::from_iter
             at ./library/alloc/src/vec/spec_from_iter.rs:33:9
  40: &lt;alloc::vec::Vec&lt;T&gt; as core::iter::traits::collect::FromIterator&lt;T&gt;&gt;::from_iter
             at ./library/alloc/src/vec/mod.rs:2461:9
  41: core::iter::traits::iterator::Iterator::collect
             at ./library/core/src/iter/traits/iterator.rs:1748:9
  42: &lt;rustc_data_structures::vec_map::VecMap&lt;K,V&gt; as core::iter::traits::collect::FromIterator&lt;(K,V)&gt;&gt;::from_iter
             at ./compiler/rustc_data_structures/src/vec_map.rs:115:14
  43: core::iter::traits::iterator::Iterator::collect
             at ./library/core/src/iter/traits/iterator.rs:1748:9
  44: rustc_mir::borrow_check::type_check::TypeChecker::eq_opaque_type_and_type
             at ./compiler/rustc_mir/src/borrow_check/type_check/mod.rs:1276:76
  45: rustc_mir::borrow_check::type_check::input_output::&lt;impl rustc_mir::borrow_check::type_check::TypeChecker&gt;::equate_inputs_and_outputs
             at ./compiler/rustc_mir/src/borrow_check/type_check/input_output.rs:122:28
  46: rustc_mir::borrow_check::type_check::type_check::{{closure}}
             at ./compiler/rustc_mir/src/borrow_check/type_check/mod.rs:179:13
  47: rustc_mir::borrow_check::type_check::type_check_internal
             at ./compiler/rustc_mir/src/borrow_check/type_check/mod.rs:221:5
  48: rustc_mir::borrow_check::type_check::type_check
             at ./compiler/rustc_mir/src/borrow_check/type_check/mod.rs:169:30
  49: rustc_mir::borrow_check::nll::compute_regions
             at ./compiler/rustc_mir/src/borrow_check/nll.rs:177:9
  50: rustc_mir::borrow_check::do_mir_borrowck
             at ./compiler/rustc_mir/src/borrow_check/mod.rs:208:9
  51: rustc_mir::borrow_check::mir_borrowck::{{closure}}
             at ./compiler/rustc_mir/src/borrow_check/mod.rs:111:9
  52: rustc_infer::infer::InferCtxtBuilder::enter
             at ./compiler/rustc_infer/src/infer/mod.rs:580:9
  53: rustc_mir::borrow_check::mir_borrowck
             at ./compiler/rustc_mir/src/borrow_check/mod.rs:108:27
  54: rustc_mir::borrow_check::provide::{{closure}}
             at ./compiler/rustc_mir/src/borrow_check/mod.rs:91:17
  55: core::ops::function::FnOnce::call_once
             at ./library/core/src/ops/function.rs:227:5
  56: rustc_query_system::dep_graph::graph::DepGraph&lt;K&gt;::with_task_impl::{{closure}}
             at ./compiler/rustc_query_system/src/dep_graph/graph.rs:243:62
  57: rustc_middle::dep_graph::&lt;impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind&gt;::with_deps::{{closure}}::{{closure}}
             at ./compiler/rustc_middle/src/dep_graph/mod.rs:76:46
  58: rustc_middle::ty::context::tls::enter_context::{{closure}}
             at ./compiler/rustc_middle/src/ty/context.rs:1741:50
  59: rustc_middle::ty::context::tls::set_tlv
             at ./compiler/rustc_middle/src/ty/context.rs:1725:9
  60: rustc_middle::ty::context::tls::enter_context
             at ./compiler/rustc_middle/src/ty/context.rs:1741:9
  61: rustc_middle::dep_graph::&lt;impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind&gt;::with_deps::{{closure}}
             at ./compiler/rustc_middle/src/dep_graph/mod.rs:76:13
  62: rustc_middle::ty::context::tls::with_context::{{closure}}
             at ./compiler/rustc_middle/src/ty/context.rs:1769:40
  63: rustc_middle::ty::context::tls::with_context_opt
             at ./compiler/rustc_middle/src/ty/context.rs:1758:22
  64: rustc_middle::ty::context::tls::with_context
             at ./compiler/rustc_middle/src/ty/context.rs:1769:9
  65: rustc_middle::dep_graph::&lt;impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind&gt;::with_deps
             at ./compiler/rustc_middle/src/dep_graph/mod.rs:73:9
  66: rustc_query_system::dep_graph::graph::DepGraph&lt;K&gt;::with_task_impl
             at ./compiler/rustc_query_system/src/dep_graph/graph.rs:243:26
  67: rustc_query_system::query::plumbing::force_
</code></pre></div>



<a name="244157642"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244157642" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244157642">(Jun 28 2021 at 14:59)</a>:</h4>
<p>anyway, don't worry, will take a look</p>



<a name="244157940"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244157940" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244157940">(Jun 28 2021 at 15:01)</a>:</h4>
<p>ohh right, we are trying to convert a <code>ReErased</code> region, unsure how this is in general done but I guess we want to skip those?</p>



<a name="244160335"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244160335" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244160335">(Jun 28 2021 at 15:17)</a>:</h4>
<p>I guess we need something like ...</p>



<a name="244160342"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244160342" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244160342">(Jun 28 2021 at 15:17)</a>:</h4>
<div class="codehilite" data-code-language="Diff"><pre><span></span><code><span class="gh">diff --git a/compiler/rustc_mir/src/borrow_check/type_check/mod.rs b/compiler/rustc_mir/src/borrow_check/type_check/mod.rs</span>
<span class="gh">index a535b1fa354..607af7bd763 100644</span>
<span class="gd">--- a/compiler/rustc_mir/src/borrow_check/type_check/mod.rs</span>
<span class="gi">+++ b/compiler/rustc_mir/src/borrow_check/type_check/mod.rs</span>
<span class="gu">@@ -1276,13 +1276,18 @@ fn eq_opaque_type_and_type(</span>
         let concrete_opaque_types: VecMap&lt;_, _&gt; = concrete_opaque_types
             .iter()
             .map(|(k, v)| {
<span class="gd">-                (</span>
<span class="gd">-                    *k,</span>
<span class="gd">-                    self.borrowck_context</span>
<span class="gd">-                        .universal_regions</span>
<span class="gd">-                        .indices</span>
<span class="gd">-                        .fold_to_region_vids(infcx.tcx, *v),</span>
<span class="gd">-                )</span>
<span class="gi">+                let substs = tcx.fold_regions(k.substs, &amp;mut false, |region, _| {</span>
<span class="gi">+                    if let ty::ReVar(..) = region {</span>
<span class="gi">+                        self.borrowck_context</span>
<span class="gi">+                            .universal_regions</span>
<span class="gi">+                            .indices</span>
<span class="gi">+                            .fold_to_region_vids(tcx, region)</span>
<span class="gi">+                    } else {</span>
<span class="gi">+                        region</span>
<span class="gi">+                    }</span>
<span class="gi">+                });</span>
<span class="gi">+</span>
<span class="gi">+                (OpaqueTypeKey { def_id: k.def_id, substs }, *v)</span>
             })
             .collect();
</code></pre></div>



<a name="244160381"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244160381" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244160381">(Jun 28 2021 at 15:17)</a>:</h4>
<p>trying that out</p>



<a name="244162501"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244162501" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244162501">(Jun 28 2021 at 15:32)</a>:</h4>
<p>hmmm still getting ...</p>



<a name="244162524"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244162524" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244162524">(Jun 28 2021 at 15:32)</a>:</h4>
<div class="codehilite"><pre><span></span><code>error[E0720]: cannot resolve opaque type
  --&gt; library/core/src/iter/adapters/take.rs:85:14
   |
85 |         ) -&gt; impl FnMut(Acc, T) -&gt; ControlFlow&lt;R, Acc&gt; + &#39;a {
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ recursive opaque type
</code></pre></div>



<a name="244162558"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244162558" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244162558">(Jun 28 2021 at 15:32)</a>:</h4>
<p>but I'm not sure how right my proposed "fix" was</p>



<a name="244173051"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244173051" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244173051">(Jun 28 2021 at 16:48)</a>:</h4>
<p>well there's no <code>ReVar</code> region at that point</p>



<a name="244173089"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244173089" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244173089">(Jun 28 2021 at 16:49)</a>:</h4>
<p>would need to read a bit to understand how it works</p>



<a name="244173102"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244173102" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244173102">(Jun 28 2021 at 16:49)</a>:</h4>
<p>meanwhile pointers are appreciated</p>



<a name="244175280"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244175280" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244175280">(Jun 28 2021 at 17:05)</a>:</h4>
<div class="codehilite"><pre><span></span><code>DEBUG rustc_mir::borrow_check::type_check CHECK: concrete_opaque_types=VecMap([(OpaqueTypeKey { def_id: DefId(0:7394 ~ core[ef11]::iter::traits::iterator::Iterator::partition_in_place::is_true::{opaque#1}), substs: [T, impl FnMut(&amp;       T) -&gt; bool, ReFree(DefId(0:7391 ~ core[ef11]::iter::traits::iterator::Iterator::partition_in_place::is_true), BrAnon(0))] }, [closure@library/core/src/iter/traits/iterator.rs:1862:13: 1862:37])])
DEBUG rustc_mir::borrow_check::type_check CHECK: opaque_type_key=OpaqueTypeKey { def_id: DefId(0:7394 ~ core[ef11]::iter::traits::iterator::Iterator::partition_in_place::is_true::{opaque#1}), substs: [T, impl FnMut(&amp;T) -&gt; bool, &#39;_#       1r] }
</code></pre></div>



<a name="244178366"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244178366" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244178366">(Jun 28 2021 at 17:27)</a>:</h4>
<p>I have a <code>ReFree</code> in the <code>concrete_opaque_types</code> map and <code>ReVar</code> in <code>opaque_type_key</code></p>



<a name="244340834"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244340834" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244340834">(Jun 29 2021 at 20:14)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116266">Santiago Pastorino</span> <a href="#narrow/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE/near/244157940">said</a>:</p>
<blockquote>
<p>ohh right, we are trying to convert a <code>ReErased</code> region, unsure how this is in general done but I guess we want to skip those?</p>
</blockquote>
<p>hmm, I'm not sure I expect to get an <code>ReErased</code> region here! that's funny. Is this building lib core, <span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> ?</p>



<a name="244341054"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244341054" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244341054">(Jun 29 2021 at 20:16)</a>:</h4>
<p>yes</p>



<a name="244341093"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244341093" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244341093">(Jun 29 2021 at 20:16)</a>:</h4>
<p>it's building core</p>



<a name="244341112"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244341112" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244341112">(Jun 29 2021 at 20:16)</a>:</h4>
<p>I'm not sure what kind of lifetimes are we supposed to have there</p>



<a name="244341241"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244341241" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244341241">(Jun 29 2021 at 20:17)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE/near/244340834">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="116266">Santiago Pastorino</span> <a href="#narrow/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE/near/244157940">said</a>:</p>
<blockquote>
<p>ohh right, we are trying to convert a <code>ReErased</code> region, unsure how this is in general done but I guess we want to skip those?</p>
</blockquote>
<p>hmm, I'm not sure I expect to get an <code>ReErased</code> region here! that's funny. Is this building lib core, <span class="user-mention silent" data-user-id="116266">Santiago Pastorino</span> ?</p>
</blockquote>
<p>you get <code>ReErased</code>, <code>ReFree</code> and all the different types of lifetimes but <code>ReVar</code> which is the one this method assumes that you would be getting</p>



<a name="244357341"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244357341" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244357341">(Jun 29 2021 at 22:38)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> can you push the ICEing version to github?</p>



<a name="244357608"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244357608" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244357608">(Jun 29 2021 at 22:40)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> what do you mean by ICEing version?</p>



<a name="244357611"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244357611" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244357611">(Jun 29 2021 at 22:40)</a>:</h4>
<p>the latest stuff is up</p>



<a name="244357626"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244357626" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244357626">(Jun 29 2021 at 22:41)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/issues/86410">#86410</a></p>



<a name="244357694"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244357694" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244357694">(Jun 29 2021 at 22:42)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> you would see here <a href="https://github.com/rust-lang/rust/pull/86410/files#diff-88ddacabf09eb79ece1dbfada296b5f0312b22bdfeba5013740b4f480e853355R1280">https://github.com/rust-lang/rust/pull/86410/files#diff-88ddacabf09eb79ece1dbfada296b5f0312b22bdfeba5013740b4f480e853355R1280</a> that that never matches</p>



<a name="244357734"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244357734" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244357734">(Jun 29 2021 at 22:42)</a>:</h4>
<p>region is never <code>ReVar</code> and if I remove the if let you would get an ICE</p>



<a name="244357737"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244357737" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244357737">(Jun 29 2021 at 22:42)</a>:</h4>
<p>maybe that's what you meant by ICEing?</p>



<a name="244357759"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/244357759" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#244357759">(Jun 29 2021 at 22:43)</a>:</h4>
<p>to ICE we need to remove the if let else part and leave the call to <code>fold_to_region_vids</code></p>



<a name="245039904"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245039904" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245039904">(Jul 06 2021 at 13:41)</a>:</h4>
<p>Hey <span class="user-mention" data-user-id="116266">@Santiago Pastorino</span>, are you around now?</p>



<a name="245039911"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245039911" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245039911">(Jul 06 2021 at 13:41)</a>:</h4>
<p>I was going to look into this a bit with <span class="user-mention" data-user-id="124288">@oli</span></p>



<a name="245047048"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245047048" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245047048">(Jul 06 2021 at 14:33)</a>:</h4>
<p>hey</p>



<a name="245047057"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245047057" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245047057">(Jul 06 2021 at 14:33)</a>:</h4>
<p><span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span></p>



<a name="245047087"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245047087" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245047087">(Jul 06 2021 at 14:33)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> <span class="user-mention" data-user-id="124288">@oli</span> do you need something from me?</p>



<a name="245047750"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245047750" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245047750">(Jul 06 2021 at 14:38)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> we just pushed some things to your branch :)</p>



<a name="245047764"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245047764" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245047764">(Jul 06 2021 at 14:38)</a>:</h4>
<p>We got the code here working</p>



<a name="245047778"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245047778" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245047778">(Jul 06 2021 at 14:38)</a>:</h4>
<p>cool</p>



<a name="245047789"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245047789" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245047789">(Jul 06 2021 at 14:38)</a>:</h4>
<p>I was going to invite you to join into our chat session</p>



<a name="245047814"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245047814" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245047814">(Jul 06 2021 at 14:38)</a>:</h4>
<p>ohh ouch :)</p>



<a name="245047840"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245047840" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245047840">(Jul 06 2021 at 14:38)</a>:</h4>
<p>did you record it? :P</p>



<a name="245047852"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245047852" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245047852">(Jul 06 2021 at 14:38)</a>:</h4>
<p>no :)</p>



<a name="245047863"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245047863" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245047863">(Jul 06 2021 at 14:38)</a>:</h4>
<p>but you can see the two commits, <span class="user-mention" data-user-id="124288">@oli</span> or I can explain</p>



<a name="245047903"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245047903" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245047903">(Jul 06 2021 at 14:39)</a>:</h4>
<p>there were 2 separate problems</p>



<a name="245047923"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245047923" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245047923">(Jul 06 2021 at 14:39)</a>:</h4>
<p>(1) you were doing the mapping wrong, which is what led to the value not being found</p>



<a name="245047968"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245047968" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245047968">(Jul 06 2021 at 14:39)</a>:</h4>
<p>(2) in the typeck/collect code, some of what we we did in the first PR wasn't right -- instead of getting a single value out from the map, what we needed to do was to iterate over all values</p>



<a name="245047981"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245047981" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245047981">(Jul 06 2021 at 14:39)</a>:</h4>
<p>(that was my bad, I misunderstood that part in review)</p>



<a name="245048224"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245048224" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245048224">(Jul 06 2021 at 14:41)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE/near/245047923">said</a>:</p>
<blockquote>
<p>(1) you were doing the mapping wrong, which is what led to the value not being found</p>
</blockquote>
<p>mapping wrong? say more :)</p>



<a name="245048434"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245048434" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245048434">(Jul 06 2021 at 14:42)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE/near/245047968">said</a>:</p>
<blockquote>
<p>(2) in the typeck/collect code, some of what we we did in the first PR wasn't right -- instead of getting a single value out from the map, what we needed to do was to iterate over all values</p>
</blockquote>
<p>ohh ok I see that the code goes over all the elements but curious about what issue was produced without doing that</p>



<a name="245048545"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245048545" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245048545">(Jul 06 2021 at 14:43)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116266">Santiago Pastorino</span> <a href="#narrow/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE/near/245048434">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE/near/245047968">said</a>:</p>
<blockquote>
<p>(2) in the typeck/collect code, some of what we we did in the first PR wasn't right -- instead of getting a single value out from the map, what we needed to do was to iterate over all values</p>
</blockquote>
<p>ohh ok I see that the code goes over all the elements but curious about what issue was produced without doing that</p>
</blockquote>
<p>the issue was that it did not see the second defining use in the same function, and thus did not error with a conflict</p>



<a name="245048572"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245048572" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245048572">(Jul 06 2021 at 14:43)</a>:</h4>
<p>it just compiled successfully, like before all the other changes</p>



<a name="245048598"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245048598" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245048598">(Jul 06 2021 at 14:43)</a>:</h4>
<p><span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span></p>



<a name="245048710"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245048710" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245048710">(Jul 06 2021 at 14:44)</a>:</h4>
<p>which makes me wonder why the original thing (different types), was fixed. Is that checked elsewhere? do we have duplicate checks now?</p>



<a name="245048746"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245048746" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245048746">(Jul 06 2021 at 14:44)</a>:</h4>
<p>I would have thought that to be checked right here with a loop</p>



<a name="245048785"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245048785" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245048785">(Jul 06 2021 at 14:45)</a>:</h4>
<p>but I should probably stop asking and start getting up to date on all the TAIT PRs that happened</p>



<a name="245049327"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245049327" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245049327">(Jul 06 2021 at 14:48)</a>:</h4>
<p><span class="user-mention silent" data-user-id="124288">oli</span> <a href="#narrow/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE/near/245048710">said</a>:</p>
<blockquote>
<p>which makes me wonder why the original thing (different types), was fixed. Is that checked elsewhere? do we have duplicate checks now?</p>
</blockquote>
<p>it's a good question, actually</p>



<a name="245049506"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245049506" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245049506">(Jul 06 2021 at 14:50)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116266">Santiago Pastorino</span> <a href="#narrow/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE/near/245048224">said</a>:</p>
<blockquote>
<p>mapping wrong? say more :)</p>
</blockquote>
<p>well, the code you had written was only mapping <code>ReVar</code> instances</p>



<a name="245049532"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245049532" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245049532">(Jul 06 2021 at 14:50)</a>:</h4>
<p>but that is kind of the opposite of what we want</p>



<a name="245049549"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245049549" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245049549">(Jul 06 2021 at 14:50)</a>:</h4>
<p>we want to map non-variables <em>into</em> variables</p>



<a name="245049565"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245049565" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245049565">(Jul 06 2021 at 14:50)</a>:</h4>
<p>yeah yeah, I've added that because otherwise was ICEing</p>



<a name="245049569"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245049569" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245049569">(Jul 06 2021 at 14:50)</a>:</h4>
<p>beacuse in the NLL checker, we represent <em>all</em> regions as ReVar</p>



<a name="245049610"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245049610" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245049610">(Jul 06 2021 at 14:50)</a>:</h4>
<p>but I think I see what was wrong anyway</p>



<a name="245049612"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245049612" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245049612">(Jul 06 2021 at 14:50)</a>:</h4>
<p>and so we have to convert from the <code>ReFree</code> and whatever else into <code>ReVar</code></p>



<a name="245049634"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245049634" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245049634">(Jul 06 2021 at 14:51)</a>:</h4>
<p>my original code was ...</p>



<a name="245049635"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245049635" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245049635">(Jul 06 2021 at 14:51)</a>:</h4>
<p>I also took the opportunity to fold the entire key, but that's a minor detail</p>



<a name="245049804"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245049804" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245049804">(Jul 06 2021 at 14:52)</a>:</h4>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="w">        </span><span class="kd">let</span><span class="w"> </span><span class="n">concrete_opaque_types</span>: <span class="nc">VecMap</span><span class="o">&lt;</span><span class="n">_</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="o">&gt;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">concrete_opaque_types</span><span class="w"></span>
<span class="w">            </span><span class="p">.</span><span class="n">iter</span><span class="p">()</span><span class="w"></span>
<span class="w">            </span><span class="p">.</span><span class="n">map</span><span class="p">(</span><span class="o">|</span><span class="p">(</span><span class="n">k</span><span class="p">,</span><span class="w"> </span><span class="n">v</span><span class="p">)</span><span class="o">|</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                </span><span class="kd">let</span><span class="w"> </span><span class="n">substs</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">tcx</span><span class="p">.</span><span class="n">fold_regions</span><span class="p">(</span><span class="n">k</span><span class="p">.</span><span class="n">substs</span><span class="p">,</span><span class="w"> </span><span class="o">&amp;</span><span class="k">mut</span><span class="w"> </span><span class="kc">false</span><span class="p">,</span><span class="w"> </span><span class="o">|</span><span class="n">region</span><span class="p">,</span><span class="w"> </span><span class="n">_</span><span class="o">|</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">                        </span><span class="bp">self</span><span class="p">.</span><span class="n">borrowck_context</span><span class="w"></span>
<span class="w">                            </span><span class="p">.</span><span class="n">universal_regions</span><span class="w"></span>
<span class="w">                            </span><span class="p">.</span><span class="n">indices</span><span class="w"></span>
<span class="w">                            </span><span class="p">.</span><span class="n">fold_to_region_vids</span><span class="p">(</span><span class="n">tcx</span><span class="p">,</span><span class="w"> </span><span class="n">region</span><span class="p">)</span><span class="w"></span>
<span class="w">                </span><span class="p">});</span><span class="w"></span>

<span class="w">                </span><span class="p">(</span><span class="n">OpaqueTypeKey</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">def_id</span>: <span class="nc">k</span><span class="p">.</span><span class="n">def_id</span><span class="p">,</span><span class="w"> </span><span class="n">substs</span><span class="w"> </span><span class="p">},</span><span class="w"> </span><span class="o">*</span><span class="n">v</span><span class="p">)</span><span class="w"></span>
</code></pre></div>



<a name="245049812"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245049812" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245049812">(Jul 06 2021 at 14:52)</a>:</h4>
<p>I was doing that originally, and was ICEing</p>



<a name="245049850"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245049850" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245049850">(Jul 06 2021 at 14:52)</a>:</h4>
<p>but unsure why I've added the tcx.fold_regions first, and I guess that's the problem</p>



<a name="245049930"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245049930" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245049930">(Jul 06 2021 at 14:53)</a>:</h4>
<p>end calling <code>fold_to_region_vids</code> on <code>region</code> instead of on <code>k</code>, and I guess for some reason that's wrong</p>



<a name="245050475"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245050475" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245050475">(Jul 06 2021 at 14:57)</a>:</h4>
<p>hmm</p>



<a name="245050481"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245050481" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245050481">(Jul 06 2021 at 14:57)</a>:</h4>
<p>I don't know what that would be wrong</p>



<a name="245050507"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245050507" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245050507">(Jul 06 2021 at 14:57)</a>:</h4>
<p>well</p>



<a name="245050529"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245050529" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245050529">(Jul 06 2021 at 14:57)</a>:</h4>
<p>oh, I guess you probably have to be a <em>bit</em> more careful than that</p>



<a name="245050565"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245050565" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245050565">(Jul 06 2021 at 14:57)</a>:</h4>
<p>you're probably not handling bound regions correctly</p>



<a name="245050594"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245050594" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245050594">(Jul 06 2021 at 14:57)</a>:</h4>
<p>I forget if <code>fold_regions</code> invokes the callback on <em>every</em> region, I think it does</p>



<a name="245050625"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245050625" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245050625">(Jul 06 2021 at 14:58)</a>:</h4>
<p>so if you have something like <code>for&lt;'a&gt; fn(&amp;'a u32)</code> in the substs, you would invoke for <code>'a</code> too</p>



<a name="245050666"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245050666" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245050666">(Jul 06 2021 at 14:58)</a>:</h4>
<p>I guess that invoking on <code>k</code> sidesteps that problem</p>



<a name="245050750"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245050750" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245050750">(Jul 06 2021 at 14:58)</a>:</h4>
<p>ohh right</p>



<a name="245050853"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245050853" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245050853">(Jul 06 2021 at 14:59)</a>:</h4>
<p>I was hitting this ...</p>



<a name="245050854"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245050854" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245050854">(Jul 06 2021 at 14:59)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/blob/de7084414b974d47e190c73d68cd33c6a1fc5ecc/compiler/rustc_mir/src/borrow_check/universal_regions.rs#L782">https://github.com/rust-lang/rust/blob/de7084414b974d47e190c73d68cd33c6a1fc5ecc/compiler/rustc_mir/src/borrow_check/universal_regions.rs#L782</a></p>



<a name="245050866"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245050866" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245050866">(Jul 06 2021 at 14:59)</a>:</h4>
<p>the <code>else</code> part of it</p>



<a name="245051055"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245051055" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245051055">(Jul 06 2021 at 15:00)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> <span class="user-mention" data-user-id="124288">@oli</span> did you see that the PR is not compiling?</p>



<a name="245051064"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245051064" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245051064">(Jul 06 2021 at 15:00)</a>:</h4>
<div class="codehilite"><pre><span></span><code>error[E0720]: cannot resolve opaque type
   --&gt; compiler/rustc_middle/src/ty/sty.rs:656:31
    |
656 |     ) -&gt; impl Iterator&lt;Item = impl Iterator&lt;Item = Ty&lt;&#39;tcx&gt;&gt; + Captures&lt;&#39;tcx&gt;&gt; {
    |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot resolve opaque type
</code></pre></div>



<a name="245051118"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245051118" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245051118">(Jul 06 2021 at 15:01)</a>:</h4>
<p>oh</p>



<a name="245051180"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245051180" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245051180">(Jul 06 2021 at 15:01)</a>:</h4>
<p>interesting</p>



<a name="245051193"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245051193" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245051193">(Jul 06 2021 at 15:01)</a>:</h4>
<p>let me try <code>x.py build --stage 2</code></p>



<a name="245051652"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245051652" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245051652">(Jul 06 2021 at 15:04)</a>:</h4>
<p>ok, well, I see the problem</p>



<a name="245051656"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245051656" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245051656">(Jul 06 2021 at 15:04)</a>:</h4>
<p>I wonder if we can minimize it :)</p>



<a name="245051689"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245051689" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245051689">(Jul 06 2021 at 15:05)</a>:</h4>
<p>(also, I think that this <code>Captures&lt;'tcx&gt;</code> does nothing there)</p>



<a name="245070825"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245070825" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245070825">(Jul 06 2021 at 17:21)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> what's the problem?</p>



<a name="245082530"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245082530" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245082530">(Jul 06 2021 at 18:49)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> I didn't have time to dig in yet!</p>



<a name="245088080"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245088080" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245088080">(Jul 06 2021 at 19:33)</a>:</h4>
<p><span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> so it looks like the problem is tied to <code>-&gt; impl Iterator&lt;Item = impl Bar&gt;</code>, the nested</p>



<a name="245088121"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245088121" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245088121">(Jul 06 2021 at 19:33)</a>:</h4>
<p>the good news is that we have several tests that are now failing</p>



<a name="245088135"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245088135" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245088135">(Jul 06 2021 at 19:33)</a>:</h4>
<p>e.g., ui/impl-trait/nested-return-type.rs</p>



<a name="245088151"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245088151" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245088151">(Jul 06 2021 at 19:33)</a>:</h4>
<p>so we can debug those</p>



<a name="245088457"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245088457" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245088457">(Jul 06 2021 at 19:36)</a>:</h4>
<p>yeah</p>



<a name="245088467"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245088467" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245088467">(Jul 06 2021 at 19:36)</a>:</h4>
<p>but why are those tests showing up now?</p>



<a name="245088536"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245088536" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245088536">(Jul 06 2021 at 19:36)</a>:</h4>
<p>I don't know!</p>



<a name="245088539"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245088539" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245088539">(Jul 06 2021 at 19:36)</a>:</h4>
<p>Have to debug :)</p>



<a name="245088552"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245088552" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245088552">(Jul 06 2021 at 19:37)</a>:</h4>
<p>ok</p>



<a name="245225921"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245225921" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245225921">(Jul 07 2021 at 18:51)</a>:</h4>
<p>Hey <span class="user-mention" data-user-id="124288">@oli</span> -- I think you're away today -- but I assigned <a href="https://github.com/rust-lang/rust/issues/86465">https://github.com/rust-lang/rust/issues/86465</a> to you, it's the issue we were poking at earlier.</p>



<a name="245226036"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245226036" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245226036">(Jul 07 2021 at 18:52)</a>:</h4>
<p>But we should setup a "sync time" for TAIT, together with <span class="user-mention" data-user-id="116266">@Santiago Pastorino</span> and whomever else wants to join (we could do it on Zulip)</p>



<a name="245338211"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245338211" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245338211">(Jul 08 2021 at 16:34)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span>, <span class="user-mention" data-user-id="116266">@Santiago Pastorino</span>, what's a good time to setup and meet?</p>



<a name="245340358"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245340358" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245340358">(Jul 08 2021 at 16:53)</a>:</h4>
<p>I guess I’m fine to set it up when you both are able</p>



<a name="245437438"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245437438" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245437438">(Jul 09 2021 at 12:43)</a>:</h4>
<p>and niko has access to my calendar <span aria-label="grinning" class="emoji emoji-1f600" role="img" title="grinning">:grinning:</span> pick anything that fits you</p>



<a name="245440290"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/taits%20deconstruction%20ICE/near/245440290" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/taits.20deconstruction.20ICE.html#245440290">(Jul 09 2021 at 13:09)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> <span class="user-mention" data-user-id="124288">@oli</span> <span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span>, just let me know</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>